- return unless can?(current_user, :admin_operations, @project)

- setting = error_tracking_setting

= render ::Layouts::SettingsBlockComponent.new(_('Error tracking'),
  id: 'js-error-tracking-settings') do |c|
  - c.with_description do
    = _('Link Sentry to GitLab to discover and view the errors your application generates.')
    = link_to _('Learn more.'), help_page_path('operations/error_tracking.md'), target: '_blank', rel: 'noopener noreferrer'
  - c.with_body do
    .js-error-tracking-form{ data: { list_projects_endpoint: project_error_tracking_projects_path(@project, format: :json),
        operations_settings_endpoint: project_settings_operations_path(@project),
        project: error_tracking_setting_project_json,
        api_host: setting.api_host,
        enabled: setting.enabled.to_json,
        integrated: setting.integrated.to_json,
        gitlab_dsn: setting.gitlab_dsn,
        token: setting.token.present? ? '*' * 12 : nil } }
